home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
comm
/
mail
/
AEMail230.lha
/
aemail230
/
arexx
/
placeaddr.aem
< prev
next >
Wrap
Text File
|
1999-02-28
|
1KB
|
60 lines
/* AEMail Add EMail Address Variable to Individual in Address Book */
OPTIONS RESULTS
/* TRACE ALL */
GETVAR
emailaddr = RESULT
IF (POS('@', emailaddr, 1) = 0) THEN DO
OKAY1 "No email address given"
EXIT
END
OK = 0
askstring = 1
DO UNTIL OK = 1
msg = 'Enter a Nickname for '||emailaddr
IF (askstring) THEN DO
GETSTRING '"'msg'"'
nick = RESULT
END
ELSE askstring = 1
IF (nick = "") THEN DO
OKAY2 '"Re-enter Nickname|Cancel"' "You must have a nickname"
IF (result = 0) THEN exit
ITERATE
END
IF (LENGTH(nick) > 8) THEN DO
OKAY2 '"Re-enter Nickname|Cancel"' "You can not have a nickname greater than 8 characters"
IF (result = 0) THEN exit
ITERATE
END
ADDRESS_BOOK GET nick TYPE
addrtype = RESULT
IF (addrtype = -1) THEN DO
msg = 'Enter a real name for '||emailaddr
GETSTRING '"'msg'"'
realname = result
END
ELSE DO
OKAY2 '"Re-enter Nickname|Show Nickname List|Cancel"' "Nickname is already is Use"
IF (RESULT = 0) THEN exit
IF (RESULT = 2) THEN DO
ADDRESS_BOOK LIST ALL LF
alllist = RESULT
GETLISTITEM "'"alllist"' 'Enter nickname not in list'"
nick = RESULT
askstring = 0
END
ELSE askstring = 1
ITERATE
END
OK = 1
END
ADDRESS_BOOK ADD INDIVIDUAL nick emailaddr realname